<!DOCTYPE html  >
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="/js/category_view.js"></script>

<head th:include="/base/common_css('test')">


<body>
<div th:include="/base/common_banner"></div>

<!-- Header ends -->
<!-- Main content starts -->

<div class="content">

    <!-- Sidebar -->
    <!--menu ????-->
    <div th:include="/base/common_menu"></div>
    <!--menu????-->
    <!-- Sidebar ends -->

    <!-- Main bar -->
    <div class="mainbar">

        <!-- Page heading -->
        <div th:include="/base/common_pageHeader"></div>
        <!-- Page heading ends -->

        <div class="matter">
            <div class="container">
                <div class="row">
                    <div class="col-md-10">
                        <div class="widget">
                            <div class="widget-head">
                                <div class="pull-left">分类列表</div>
                                <div class="widget-icons pull-right">

                                    <div class="btn-group">
                                        <button onclick="openPage('/view/saveCategory')" class="btn btn-primary">新增
                                        </button>
                                    </div>
                                </div>
                                <div class="clearfix"></div>
                            </div>

                            <div class="widget-content medias">
                                <table border="1" class="table table-striped table-bordered table-hover"
                                       style="table-layout:fixed">
                                    <thead>
                                    <tr>
                                        <th>
                            <span class="uni">
                              <input type='checkbox' value='check1'/>全选
                            </span>
                                        </th>
                                        <th>序号</th>
                                        <th>分类名</th>
                                        <th>分类描述</th>
                                        <th>所属分组</th>
                                        <th>创建时间</th>
                                        <th>是否展示</th>
                                        <th>操作</th>
                                    </tr>
                                    <!--<tbody >-->

                                    <tr th:each="obj:${cateList.list}">
                                        <td>
                                        <span class="uni">
                                          <input type='checkbox' value='check1'/>
                                        </span>
                                        </td>
                                        <td th:text="${obj.sort}"></td>
                                        <td th:text="${obj.cateName}">/td>
                                        <td th:text="${obj.cateDescription}"
                                            style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"></td>
                                        <div th:each="group:${groupList}">
                                            <td th:if="${group.groupId==obj.groupId}"
                                                th:text="${group.groupName}"></td>
                                        </div>
                                        <td th:text="${#dates.format(obj.createTime,'yyyy-MM-dd')} "></td>
                                        <td th:text="${obj.Show==0} ? '否': '是'">123</td>
                                        <td>

                                            <a th:href="@{'/view/saveCategory?cateId='+${obj.cateId}}"
                                               class="btn btn-success">修改</a>&nbsp;&nbsp;&nbsp;
                                            <a th:href="@{'/view/deleteCategory?cateId='+${obj.cateId}}"
                                               class="btn btn-danger">删除</a>

                                        </td>
                                    </tr>
                                    </thead>
                                </table>

                                <!--分页-->
                                <div class="widget-foot">
                                    <div id="page2">
                                        <input type="hidden" id="pageNumber" th:value="${cateList.pageNum}">
                                        <input type="hidden" id="pageSize" th:value="${cateList.pageSize}">
                                        <input type="hidden" id="totalPage" th:value="${cateList.pages}">
                                        <input type="hidden" id="total" th:value="${cateList.total}">
                                    </div>
                                </div>

                                <!-- Mainbar ends -->
                                <div class="clearfix"></div>


                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>


</div>


<!--footer-->
<div th:include="/base/common_footer"></div>
<!---->

<!-- Scroll to top -->
<span class="totop"><a href="#"><i class="icon-chevron-up"></i></a></span>

<!--js????-->
<div th:include="/base/common_js"></div>
<!--js????-->

<script type="text/javascript">
    function checkvalue(n, obj) {
        var oTip = document.getElementById("tip" + n);
        if (obj.value == "") {
            oTip.innerHTML = obj.title;
        }
        else {
            oTip.innerHTML = "";
        }
    }
    initPage('page2', '/view/category', {}, false);
</script>
<!-- Script for this page -->


</body>
</html>
